using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using NetROS.Tiers.Entities;

namespace ReportiFin
{
    public partial class BlagajnickiIzvjestajIspis : DevExpress.XtraReports.UI.XtraReport
    {
        public BlagajnickiIzvjestajIspis()
        {
            InitializeComponent();
        }

        private DateTime datumdo = DateTime.Today;
        private bool r = true;
        public BlagajnickiIzvjestajIspis(VwBlagajnaIzvjestajSaldo blagajnaIzvjestajSaldo, string NazivTvrtke)
        {
            InitializeComponent();
            bindingSource1.DataSource = blagajnaIzvjestajSaldo;
            datumdo = blagajnaIzvjestajSaldo.DatumDo;
            xrLabelTvrtka.Text = NazivTvrtke;
            if (r) xrPageInfo1.PreviewDoubleClick += xrPageInfo1_PreviewDoubleClick;
        }

        private void xrPageInfo1_PreviewDoubleClick(object sender, PreviewMouseEventArgs e)
        {
            xrPageInfo1.Format = string.Format("Datum : {0}", datumdo.ToString("dd.MM.yyyy"));
            xrPageInfo1.PreviewClick -= xrPageInfo1_PreviewDoubleClick;
            r = false;
           this.CreateDocument(true);
            
        }

   

    }
}
